From: Philip Withnall Date: Wed, 2 Apr 2025 10:39:45 +0000 (+0100) Subject: breakManager: Activate wellbeing settings on clicking notification X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~139^2^2~20 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=6fd4dcdc8ccf662e805315aa0364f6d392c68ec0;p=gnome-shell.git breakManager: Activate wellbeing settings on clicking notification Signed-off-by: Philip Withnall Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8305 Part-of: --- diff --git a/js/misc/breakManager.js b/js/misc/breakManager.js index 8b3cce980..42e7c3569 100644 --- a/js/misc/breakManager.js +++ b/js/misc/breakManager.js @@ -950,7 +950,7 @@ class BreakNotificationSource extends GObject.Object { } if (this._notification === null) { - this._notification = new BreakNotification(this._source, this._manager); + this._notification = new BreakNotification(this._source, this._manager, this._app); this._notification.connect('destroy', () => (this._notification = null)); } @@ -1306,13 +1306,14 @@ const BreakNotification = GObject.registerClass({ false), }, }, class BreakNotification extends MessageTray.Notification { - constructor(source, manager) { + constructor(source, manager, app) { super({ source, resident: true, }); this._manager = manager; + this._app = app; this.connect('destroy', this._onDestroy.bind(this)); this._delayAction = null; @@ -1320,6 +1321,11 @@ const BreakNotification = GObject.registerClass({ this._takeAction = null; } + activate() { + this._app.activate(); + super.activate(); + } + _onDestroy(_notification, destroyedReason) { // If it was destroyed by the user (by pressing the close button), skip // the current break.